cmake_minimum_required (VERSION 2.6)
if(APPLE)
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++")
endif()

set (ROOT_DIR ..)
set (INCLUDE_DIR ${ROOT_DIR}/include)
set (INCLUDE_PUBLIC_DIR ${INCLUDE_DIR}/public)

include_directories (
	${INCLUDE_DIR}
	${INCLUDE_PUBLIC_DIR}
)

set (WINDOW_FILES
	${INCLUDE_PUBLIC_DIR}/IWindow.h
	${INCLUDE_DIR}/EngineWindow.h
)

if(WIN32)
	add_definitions(-DUNICODE)
	set (WINDOW_FILES
		${WINDOW_FILES}
		WinWindow.h
		WinWindow.cpp
	)
elseif(ANDROID)
	set (WINDOW_FILES
		${WINDOW_FILES}
		AndroidWindow.h
		AndroidWindow.cpp
	)
elseif(APPLE)
	set (WINDOW_FILES
		${WINDOW_FILES}
		MacWindow.h
		MacWindow.mm
	)
	find_library(OS_SPECIFIC_LIBS AppKit)
	add_definitions(-Wno-unused-value -Wno-switch)
else() # Linux
endif()

add_library (VEngineWindow STATIC
	${WINDOW_FILES}
)

target_link_libraries(VEngineWindow ${OS_SPECIFIC_LIBS})

install (TARGETS VEngineWindow DESTINATION ${CMAKE_BINARY_DIR}/Binaries/)